package structure;

public class Point {

	double r;
	double theta;
	
	public Point(double r, double theta){
		this.r = r;
		this.theta = theta;
	}

	public double getR() {
		return r;
	}

	public void setR(double r) {
		this.r = r;
	}

	public double getTheta() {
		return theta;
	}

	public void setTheta(double theta) {
		this.theta = theta;
	}
	
	public int[] toCartesianCoordinates(){
		int x = (int) Math.floor(r * Math.cos(theta*Math.PI/180));
		int y = (int) Math.floor(r * Math.sin(theta*Math.PI/180));
		return new int[]{x,y};
	}
	
	public String toString(){
		return r + "," + theta;
	}
	
}